Field of the Invention
The present invention relates to a numerical controller for controlling a five-axis machine having at least three linear axes and two rotation axes, and more specifically, to a numerical controller capable of displaying and inputting a tool direction relative to a workpiece. In particular, this numerical controller commands a tool center point position based on command linear axis positions on a designated program coordinate system and issues a tool direction command, thereby controlling the machine for machining. Further, the numerical controller can add a linear or rotation axis movement amount based on a manual command (by manual hand feed, jog feed, etc.) to an interpolated tool center point position, tool length compensation vector, or rotation axis positions.
Description of the Related Art
Japanese Patent Application Laid-Open No. 2003-195917 discloses a technique comprising a first interpolation unit configured to interpolate linear axes in a coordinate system defined on a table and a second interpolation unit configured to interpolate rotation axes. According to this technique, interpolation positions of the linear axes are compensated based on those of the rotation axes. In the field of five-axis machines, this technique is generally referred to as tool center point control. In five-axis machining based on the tool center point control or the like, the tool direction is designated by a rotation axis command or vector command and represented by the end point positions of the rotation axes.
Japanese Patent Application Laid-Open No. 57-75309 discloses a technique in which X-, Y-, and Z-axes are operated so that the positional relationship between a tool center point and a workpiece can be maintained as two rotation axes are operated in response to a manual command. In the field of five-axis machines, this technique is generally referred to as three-dimensional manual feed. In the three-dimensional manual feed, actual rotation axis positions are manually input, and a tool direction is represented by the end point positions of the rotation axes.
According to the techniques disclosed in Japanese Patent Applications Laid-Open Nos. 2003-195917 and 57-75309 described above, it is necessary to calculate the tool direction (rotation axis end point positions) relative to the workpiece (or table) based on the rotation axis positions and the rotation axis configuration of each machine. Thus, the tool direction relative to the workpiece cannot be obtained from information on the rotation axis positions only.
Let us assume a rotary-table five-axis machine (with A- and C-axes as master and slave axes, respectively), such as that shown in FIG. 1. A C-axis table 5 is mounted on an A-axis table 4, and a workpiece 3 is placed on the C-axis table 5. An XYZ-coordinate system is secured to the workpiece 3. If the respective angles of the two rotation axes (A- and C-axes) are both 0°, a tool direction vector as viewed from the tables is (0, 0, 1).
If the respective angles of the A- and C-axes are −30° and 20°, as shown in FIG. 2, however, the tool direction vector as viewed from the C-axis table 5 is (−0.171, 0.470, 0.866), which cannot be easily intuitively understood from angle information for the rotation axes (A- and C-axes). To locate the tool direction vector as viewed from the C-axis table 5, therefore, it is necessary to calculate a tool direction vector based on the rotation axis positions and the machine configuration. In calculating the tool direction (rotation axis end point positions) in a machine with an inclined rotation axis, as shown in FIGS. 4A and 4B, the inclination of the inclined rotation axis must be taken into consideration.
In the three-dimensional manual feed disclosed in Japanese Patent Application Laid-Open No. 57-75309 described above, the rotation axes can be moved so that the positional relationship between the workpiece (or table) and the tool center point is maintained. Since only one of the rotation axes can be commanded to move, however, it is necessary to change the rotation axis to be operated. Further, in the case of the machine with the inclined rotation axis, as shown in FIGS. 4A and 4B, the behavior of the workpiece (or table) caused by the rotation cannot be easily predicted.